function getParams(key) {

    let a = window.location.search.substring(1);
    a = decodeURI(a)
    let vars = a.split("&");
    for (var i = 0; i < vars.length; i++) {
        var tempArr = vars[i].split("=");
        if (tempArr[0] == key)
            return tempArr[1]
    }
    return false;
}